<template>
  <view class="content">
    <view class="content-header">
      <!-- <image src="goods.prizeAvatar" mode=""></image> -->
      <image src="https://small.qaqavr.com/img/zhongrui/bg.png" mode=""></image>
    </view>
    <view class="content-box">
      <view class="baoming" v-for="(item,index) in list" :key="index">
        <view style="width: 100%; height: 50rpx;  display: flex;justify-content: space-between; align-items: center;">
          <view style="display: flex;justify-content: space-between; align-items: center;">
            <view style="width: 50rpx ; height: 50rpx; margin-right: 10rpx;">
              <image src="https://small.qaqavr.com/img/zhongrui/small.png" style="width: 100%; height: 100%;" mode=""></image>
            </view>
            <view style="font-size: 32rpx; font-weight: 600;">{{item.job.jobName}}</view>
          </view>
          
          <view style="font-size: 30rpx ; font-weight: 600; color: #666666 ;">
            {{item.signUpStatus== 1 ?'待面试' : item.signUpStatus == 2 ? '拒绝' : item.signUpStatus == 3 ? '未处理' :  item.signUpStatus == 4 ? '不符合条件': "已入职"}}
          </view>
        </view>
        
        
        <view style="width: 100%; height: 150rpx; background-color: #f7f7f7; margin-top: 20rpx; box-sizing: border-box; padding: 5rpx 50rpx;font-size: 24rpx; color: #666666; display: flex; flex-direction: column; justify-content: space-around;">
          
          <view>姓名: {{item.signInfo.realName}}</view>
          <view>报名时间:  {{item.createTime.substr(0,item.createTime.length-8)}}</view>
          <view>职位代号:  {{item.jobType.keyWord + item.jobNum}}</view>
        </view>
      </view>
    </view>
    <u-loadmore  :status="status" :loading-text="loadingText" :loadmore-text="loadmoreText" :nomore-text="nomoreText" />
  </view>
</template>

<script>
  export default {
    data() {
      return {
        queryObj: {
          openId: uni.getStorageSync('openid'),
          pageIndex: 1,
          pageSize: 20
        },
        list: [],
        status: 'loadmore',
        loadingText: '加载中',
        loadmoreText: '上拉加载',
        nomoreText: '暂无更多'
      };
    },
    onLoad() {
      this.getList()
    },
    onReachBottom() {
      console.log(123)
      this.queryObj.pageSize = this.queryObj.pageSize + 10
      this.status = 'loading'
      this.getList()
      // this.status = 'nomore'
    
    },
    methods: {
      async getList() {
        const {
          data
        } = await uni.$http.post('/sign/findSignRecordPage', this.queryObj)
        if (data.statusCode !== 200) {
          return
        } else {
          this.list = data.data.data
          console.log(this.list)
          if(this.list.length === data.data.total) {
            this.status = 'nomore'
          }
        }
      }
    }
  }
</script>

<style lang="scss" scoped>
  .content {
    position: relative;
    width: 100%;
    // height: 100%;
    background-color: #f7f7f7;
 .content-header {
    height: 300rpx;
    background-color: #f7f7f7;
    image {
      width: 100%;
      height: 100%;
    }
  }
  .content-box{
    position: absolute;
    top: 50rpx;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    // height: 800rpx;
    margin-bottom: 50rpx;
    .baoming{
      width: 100%;
      height: 250rpx;
      margin-top: 10rpx;
      box-sizing: border-box;
      padding: 10rpx 30rpx;
      background-color: #fff;
      border-radius: 15rpx;
      box-shadow: 0 0 5rpx #ccc;
    }
    
   }
  
  }
</style>
